public class Sentence
{
   private String text;

   /**
      Constructs a sentence.
      @param words the words in the sentence
   */
   public Sentence(String words) 
   { 
      // your work here
      text = words;
   }

   /**
      Count the number of spaces in the sentence.
      @return number of spaces
   */
   public int numSpaces() 
   {
      // your work here
      int a=0;
      int len=text.length();
      for(int i=0;i<len;i++){
        char m;
        m=text.charAt(i);
        if(m==' ')
         a++;
      }
      return a;
   }

   /**
      Count the number of vowels in the sentence.
      @return number of vowels
   */
   public int numVowels() 
   {
      // your work here
      int a=0;
      int len=text.length();
      for(int i=0;i<len;i++){
        char m;
        m=text.charAt(i);
        if(m=='a'||m=='e'||m=='i'||m=='o'||m=='u'||m=='A'||m=='E'||m=='O'||m=='U'||m=='I')
         a++;
      }
      return a;
   }

   /**
      Get the number of consonants in the sentence.
      @return the number of consonants
   */
   public int numCons() 
   {
      return text.length() - this.numSpaces() - this.numVowels();
   }

   /**
      Get the ratio of vowels to consonants for words in the sentence.
      @return the ratio of vowels to consonants
   */
   public double ratioVowelsToCons() 
   {
      // your work here
      double ratio;
      ratio=(double)this.numVowels()/(double)this.numCons();
      return ratio;
   }
   
 
   // This method is used for checking your work. Do not modify it

   public static String check(String aSent)
   {
      Sentence aSentence = new Sentence(aSent);
      return String.format("%4.2f",aSentence.ratioVowelsToCons());
   }

}